package com.jjmmbb.anydolist;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.TextView;


public class TeamEditActivity extends BaseActivity implements OnClickListener {
	TextView bt_save, bt_cancel;
	EditText team_list;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.team_edit);
		bt_save = (TextView) findViewById(R.id.team_save);
		bt_cancel = (TextView) findViewById(R.id.team_cancel);
		team_list = (EditText) findViewById(R.id.team_list);

		bt_save.setOnClickListener(this);
		bt_cancel.setOnClickListener(this);

		ini();
	}

	void ini() {
		team_list.setText(Comm.team_list);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.team_save:
			Comm.team_list = getStr(team_list).replace('，', ',');
			Util.saveUser2Preferences(this);
			toast(res.getString(R.string.msg_saveSuccess));
			break;
		case R.id.team_cancel:
			break;
		default:
			break;
		}
		this.finish();
	}

}
